package cn.edu.cqut.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import cn.edu.cqut.entity.Customer;
import cn.edu.cqut.entity.DivideModel;
import cn.edu.cqut.entity.ReportModel;
import cn.edu.cqut.mapper.CustomerMapper;
import cn.edu.cqut.service.ICustomerService;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author FeBro-TuoMei
 * @since 2020-06-18
 */
@Service
public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> implements ICustomerService {

	@Override
	public List<ReportModel> getCustomerCountByRegion() {
		return baseMapper.selectCustomerCountByRegion();
		//利用baseMapper方法 将查询出来的数据封装
	}
	
	@Override
	public List<Customer> getCustomerWithContact() {
		return baseMapper.selectCustomerWithContact();
	}
	
	@Override
	public List<DivideModel> getCustomerCountBySearchInfo(String searchInfo) {
		return baseMapper.selectCustomerCountBySearchInfo(searchInfo);
	}
	
}
